package com.jingqiduizhang.web.users.controller;

import com.jingqiduizhang.web.users.entity.User;
import com.jingqiduizhang.web.users.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;
@RestController
@RequestMapping("user")
public class UserController {

    @Autowired
    private UserService userService;


    @GetMapping("list")
    public List<User> list(){
        return userService.list();
    }

    @GetMapping("findById")
    public User findById(String id){

        return new User();
    }

    @PostMapping("add")
    public Object add(@RequestBody User user){

        return null;
    }

    @GetMapping("delete")
    public Object delete(String ids){

        return null;
    }
}
